﻿using RealSense.Light.CodeContracts;
// *************************************************************************************************
// Project: RealSense.Light.Extensions
// Namespace: RealSense.Light.Extensions
// File: ResolutionContext.cs  Author: Peter O'Hanlon
// Copyright © Peter O'Hanlon 2014-2015
// Date: 2015/1/7 02:50
// *************************************************************************************************
using RealSense.Light.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealSense.Light.Extensions
{
  /// <summary>
  /// Provides service location capabilities for the XAML behaviors, etc.
  /// </summary>
  public static class ResolutionContext
  {
    /// <summary>
    /// Sets the resolver for use in the XAML helpers.
    /// </summary>
    /// <param name="resolver"></param>
    public static void SetResolver(IResolver resolver)
    {
      Resolver = RuntimeAssert.IsNotNull(resolver, "resolver");
    }

    /// <summary>
    /// Gets the resolver.
    /// </summary>
    public static IResolver Resolver { get; private set; }
  }
}
